function callPage(pageCurrent,pageSet,totalRecords,recordsPerPage,funcname) {
    var link = "";
    var previous = "";
    var j = 0;
    var totalNumberPage = 5;
    if (totalRecords > recordsPerPage) {
        
        if (pageSet == 0) pageSet = 1;
        j = totalRecords / recordsPerPage; 	
        if ((totalRecords % recordsPerPage) > 0) j = j + 1;      
        if (j == 0) j = 1;
        // Thuc hien neu tong so trang it hon so trang gioi han (pagesLimit)
        if (j <= totalNumberPage) {
            if (j > 0) {
                for (var i = 1; i <= j; i++) {
                    if (i == pageCurrent) {
                        link += "<b>[" + i + "]</b>" + "&nbsp;";
                    } else {                            
                        link +=  "<a href=\"javascript:"+funcname+"("+i+","+pageSet+",'"+funcname+"');\" class=\"Paging_Link\">" + i + "</a>&nbsp;";
                    }	
                }
            } else {
                link = "";
            }
            
        } else {
            
            var rows, k;
            if ((j - totalNumberPage * pageSet) > 0) {
                rows = totalNumberPage * pageSet;
            } else {
                rows = j;
            }
            
            k = totalNumberPage * (pageSet - 1) + 1;
            if (k <= rows) {
                for(var i = k; i <= rows; i++) {
                    if (i == pageCurrent) {
                        link +=  "<b>[" + i + "]</b>" + "&nbsp;";
                    } else {                         
                        link += "<a id=\"" + i + "\" href=\"javascript:"+funcname+"("+i+","+pageSet+",'"+funcname+"');\" class=\"Paging_Link\">" + i + "</a>&nbsp;";
                    }
                }
            } else {
                link = "";
            }
            
            //Bien luu trang
            var bse;
            //Bien luu nhom trang
            var bas;
            if ((j - totalNumberPage * pageSet) >= 1) {                
                bse = pageSet * totalNumberPage + 1;
                bas = pageSet + 1;      
                link += "&nbsp;&nbsp;<a href=\"javascript:"+funcname+"("+bse+","+bas+",'"+funcname+"');\" class=\"Paging_Link\">>></a>";
                
            }
            
            if (pageSet > 1) {
                bse = totalNumberPage * (pageSet - 1);
                bas = pageSet-1;                   
                previous = "<a href=\"javascript:"+funcname+"("+bse+","+bas+",'"+funcname+"');\" class=\"Paging_Link\"><<</a>&nbsp;&nbsp;";
            }
            
            if (previous != "") {
                link = previous + link;
            }
        }
    }  
    link = (link!="")?"Page:&nbsp;"+ link:"";
    return link;
}
